<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<script>
function addTerm() 
{
	window.open("/AddSO/addTerm.htm");
}
function getNumber()
{
	window.open("/AddSO/child.htm");
}
function viewDetails() 
{
	window.open("/AddSO/custDetails.htm");
}
</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Update Item</title>
</head>
<body>
<form:form action="UpdateSO.htm" method="post" commandName="sales">
<table width="100%">
<tr>    
<td>SO#</td><td><form:input path="salesOrderNumber"/>${sales.salesOrderNumber}</td>
<td>Review Date</td><td>${sales.reviewedDate}</td>
<td>Customer Type</td><td>----------------</td>
</tr>

<tr>
<td>SO Date:</td><td>${sales.salesOrderDate}</td>
<td>Review By</td><td>${sales.reviewedBy}</td>
<td>BillTo ID*</td>
<td><form:input path="billToId" /><input type="button" name="action" value="Go" onclick="return getNumber()"/></td>
<!-- <td><input type="button" name="action" value="/|\" onclick="return viewDetails()"/></td> -->
<td><input type="submit" name="action" value="view"/></td>
</tr>

<tr><td>SO Status </td>
<td><form:select path="status" items="${soStatus}"/></td>
<td>Customer PO</td>
<td><form:input path="customerPo" /></td>
<td>Bill To Name</td><td>${custinfo.name}</td>
</tr>

<tr>
<td>Revision</td>
  <td>-----------</td>
  <td>Customer Id</td>
  <td><form:input path="customerId"/><input type="button" name="action" value="Go" onclick="return getNumber()"/></td>
  <td>ShipTo Id</td>
  <td><form:input path="shipToId"/><input type="button" name="action" value="Go" onclick="return getNumber()"/></td>
 
</tr>
<tr>
 <td>Related DOc/td>
 <td><form:input path="relatedDocument" /></td>
 <td>Customer Name</td>
 <td>${custinfo.name}</td>
 <td>ShipTo Name</td>
 <td>${custinfo.name}</td>
</tr>
<tr>
<td>SalesMan</td>
<td><form:input path="salesman"/></td>
<td>project</td>
 <td><form:select path="projectName" items="${projectList}"/></td>
 <td>Ref SO</td>
 <td><form:input path="referenceSalesOrder" /></td>
</tr>
<tr>
 <td>SalesCode</td>
  <td><form:select path="salesCodeId" items="${saleCode}"/></td>
  <td>Carrier</td>
   <td><form:select path="carrier"/></td>
   <td>Contact</td>
   <td><form:input path="contact" />
</tr>
<tr>
 <td>Incoterm</td>
  <td><form:select path="incoterm" items="${incoTerm}"></form:select></td>
  <td>Write-in:</td>
  <td><form:input path="" /></td>
   <td>Language</td>
   <td><form:select path="language" items="${language}"/></td>
</tr>
<tr>
 <td>Place/Port</td>
   <td><form:input path="incotermPlacePort" /></td>
   <td>CarrierAccount</td>
   <td><form:input path="carrierAccount" /></td>
   <td>Currency*</td>
    <td><form:select path="currency" items="${currency}"/></td>
</tr>
<tr>
 <td>PrePay</td>
   <td><form:input path="arPrepay" /></td>
   <td>ACCT#</td>
  <td><form:select path="creditAccount" items="${AcctList}"/></td>
  <td>Exchange Rate</td>
   <td><form:input path="exchange" /></td>
</tr>
<tr>
<td>Requester</td>
   <td><form:input path="requester" /></td>
<td>Terms</td>
<td><form:select path="terms" items="${termList}"/><input type="button" name="GO" value="+" onclick="return addTerm()"/></td>
</tr>
</table>
</form:form>

<table border="1">
<tr>
<td>Item#</td>
<td>Type</td>
<td>Traceable</td>
<td>Rev</td>
<td>DWG</td>
<td>Qty Ordered</td>
<td>SIP</td>
<td>Qty Shipped</td>
<td>UOM</td>
<td>Price/UOM</td>
<td>Disc%</td>
<td>Ext Price</td>
<td>Ship Date</td>
<td>Arrival Date</td>
<td>Status</td>
</tr>
</table>

<form:form action="saveItem.htm" method="post" commandName="item">
<table>
<tr>
<td>Part#</td><td></td><td></td><td></td><td></td>
<td>Revision</td>
<td>Part Type</td>
<td>Part UOM</td>
<td>Descrption</td>

</tr>
<tr>
 <td><form:input path="pk.partNumber" id="value"/></td>
 <td><input type="button" name="Go" value="Go" onclick="return getNumber()"/></td><td></td><td></td></td><td></td>
<td><form:input path="revision"/></td> 
<td><form:select path="pk.partType" items="${item_types}"/></td>
</td>
 <td><form:select path="partUnit" items="${item_uoms}"/></td>
 <td><form:input path="description"/></td>
</tr>
<tr>
<td>
<input type="hidden" name="action" value="saveItem"/>
<input type="submit" name="save" value="SaveItem"/></td></tr>
</table>
</form:form>

<%-- <table>
<tr>
<td>Comments</td>
   <td><form:input path="salesOrderComments" /></td>
 </tr>
<tr>
<td>Boilerplate</td>
   <td><form:textarea path="salesOrderBoilerplate" /></td>
</tr>
<tr>
<td>PrivateNotes</td>
<td><form:input path="salesOrderPrivateNotes"/></td>
</tr>
</table> --%>
* Indicates Madetory Field 
   <input type="hidden" name="action" value="update"/>
   <input type="submit" name="action" value="Update" />
  <input type="button" name="cancel" value="cancel"/>
</body>
</html>
